library(readxl)
<-read_excel("avocado.csv..xlsx")
Caso_Aguacate_xls
library(epiDisplay)
$cat_Aguacate <- ifelse(Caso_Aguacate_xls$`AveragePrice (PRECIO PROMEDIO)` <= 1 , 'promedio-','promedio+')
Caso_Aguacate_xls
$cat_numero_total_vendido <- ifelse(Caso_Aguacate_xls$`Total Volume (NUMERO TOTAL DE AGUACATES VENDIDOS)` <= 850644 , 'ventas menores','ventas mayores')
Caso_Aguacate_xls
$cat_numero_4046_vendido <- ifelse(Caso_Aguacate_xls$`NUMERO TOTAL DE AGUACATE CON PLU 4046-PEQUEÑO VENDIDOS` <= 293008 , 'ventas menores de 4046','ventas mayores de 4046')
Caso_Aguacate_xls
$cat_numero_4225_vendido <- ifelse(Caso_Aguacate_xls$`NUMERO TOTAL DE AGUACATE CON PLU 4225-LARGO VENDIDOS` <= 295154 , 'ventas menores de 4225','ventas mayores de 4225')
Caso_Aguacate_xls
$cat_numero_4770_vendido <- ifelse(Caso_Aguacate_xls$`NUMERO TOTAL DE AGUACATE CON PLU 4770-GRANDE VENDIDOS` <= 22839 , 'ventas menores de 4770','ventas mayores de 4770')
Caso_Aguacate_xls
$bolsas_totales <- ifelse(Caso_Aguacate_xls$`Total Bags (BOLSAS TOTALES)` <= 239639 , 'bolsas totales menores','bolsas totales mayores')
Caso_Aguacate_xls
$bolsas_pequeñas <- ifelse(Caso_Aguacate_xls$`Small Bags (BOLSAS PEQUEÑAS)` <= 182194 , 'bolsas pequeñas menores','bolsas pequeñas mayores')
Caso_Aguacate_xls
$bolsas_grandes <- ifelse(Caso_Aguacate_xls$`Large Bags (BOLSAS GRANDES)` <= 54338 , 'bolsas grandes menores','bolsas grandes mayores')
Caso_Aguacate_xls
$bolsas_extragrandes <- ifelse(Caso_Aguacate_xls$`XLarge Bags (BOLSAS EXTRAGRANDES)` <= 3106 , 'bolsas extragrandes menores','bolsas extragrandes mayores') Caso_Aguacate_xls
🥑TABLAS DE FRECUENCIAS:
CODIGOS
🥑TABLA 1
library(summarytools)
freq(Caso_Aguacate_xls$cat_Aguacate)
Frequencies
Caso_Aguacate_xls$cat_Aguacate
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
--------------- ------- --------- -------------- --------- --------------
promedio- 2963 16.24 16.24 16.24 16.24
promedio+ 15286 83.76 100.00 83.76 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 2
library(summarytools)
freq(Caso_Aguacate_xls$cat_numero_4046_vendido)
Frequencies
Caso_Aguacate_xls$cat_numero_4046_vendido
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
---------------------------- ------- --------- -------------- --------- --------------
ventas mayores de 4046 2464 13.50 13.50 13.50 13.50
ventas menores de 4046 15785 86.50 100.00 86.50 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 3
library(summarytools)
freq(Caso_Aguacate_xls$cat_numero_4225_vendido)
Frequencies
Caso_Aguacate_xls$cat_numero_4225_vendido
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
---------------------------- ------- --------- -------------- --------- --------------
ventas mayores de 4225 2973 16.29 16.29 16.29 16.29
ventas menores de 4225 15276 83.71 100.00 83.71 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 4
library(summarytools)
freq(Caso_Aguacate_xls$cat_numero_4770_vendido)
Frequencies
Caso_Aguacate_xls$cat_numero_4770_vendido
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
---------------------------- ------- --------- -------------- --------- --------------
ventas mayores de 4770 2185 11.97 11.97 11.97 11.97
ventas menores de 4770 16064 88.03 100.00 88.03 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 5
library(summarytools)
freq(Caso_Aguacate_xls$cat_numero_total_vendido)
Frequencies
Caso_Aguacate_xls$cat_numero_total_vendido
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
-------------------- ------- --------- -------------- --------- --------------
ventas mayores 2732 14.97 14.97 14.97 14.97
ventas menores 15517 85.03 100.00 85.03 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 6
library(summarytools)
freq(Caso_Aguacate_xls$bolsas_totales)
Frequencies
Caso_Aguacate_xls$bolsas_totales
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
----------------------------- ------- --------- -------------- --------- --------------
bolsas totales menores 15569 85.31 85.31 85.31 85.31
bolsas totales mayores 2680 14.69 100.00 14.69 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 7
library(summarytools)
freq(Caso_Aguacate_xls$bolsas_pequeñas)
Frequencies
Caso_Aguacate_xls$bolsas_pequeñas
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
------------------------------ ------- --------- -------------- --------- --------------
bolsas pequeñas menores 15687 85.96 85.96 85.96 85.96
bolsas pequeñas mayores 2562 14.04 100.00 14.04 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 8
library(summarytools)
freq(Caso_Aguacate_xls$bolsas_grandes)
Frequencies
Caso_Aguacate_xls$bolsas_grandes
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
----------------------------- ------- --------- -------------- --------- --------------
bolsas grandes menores 15519 85.04 85.04 85.04 85.04
bolsas grandes mayores 2730 14.96 100.00 14.96 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 9
library(summarytools)
freq(Caso_Aguacate_xls$bolsas_extragrandes)
Frequencies
Caso_Aguacate_xls$bolsas_extragrandes
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
---------------------------------- ------- --------- -------------- --------- --------------
bolsas extragrandes menores 16236 88.97 88.97 88.97 88.97
bolsas extragrandes mayores 2013 11.03 100.00 11.03 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 10
library(summarytools)
freq(Caso_Aguacate_xls$`region (REGION)`)
Frequencies
Caso_Aguacate_xls$`region (REGION)`
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
------------------------- ------- --------- -------------- --------- --------------
Albany 338 1.85 1.85 1.85 1.85
Atlanta 338 1.85 3.70 1.85 3.70
BaltimoreWashington 338 1.85 5.56 1.85 5.56
Boise 338 1.85 7.41 1.85 7.41
Boston 338 1.85 9.26 1.85 9.26
BuffaloRochester 338 1.85 11.11 1.85 11.11
California 338 1.85 12.97 1.85 12.97
Charlotte 338 1.85 14.82 1.85 14.82
Chicago 338 1.85 16.67 1.85 16.67
CincinnatiDayton 338 1.85 18.52 1.85 18.52
Columbus 338 1.85 20.37 1.85 20.37
DallasFtWorth 338 1.85 22.23 1.85 22.23
Denver 338 1.85 24.08 1.85 24.08
Detroit 338 1.85 25.93 1.85 25.93
GrandRapids 338 1.85 27.78 1.85 27.78
GreatLakes 338 1.85 29.63 1.85 29.63
HarrisburgScranton 338 1.85 31.49 1.85 31.49
HartfordSpringfield 338 1.85 33.34 1.85 33.34
Houston 338 1.85 35.19 1.85 35.19
Indianapolis 338 1.85 37.04 1.85 37.04
Jacksonville 338 1.85 38.90 1.85 38.90
LasVegas 338 1.85 40.75 1.85 40.75
LosAngeles 338 1.85 42.60 1.85 42.60
Louisville 338 1.85 44.45 1.85 44.45
MiamiFtLauderdale 338 1.85 46.30 1.85 46.30
Midsouth 338 1.85 48.16 1.85 48.16
Nashville 338 1.85 50.01 1.85 50.01
NewOrleansMobile 338 1.85 51.86 1.85 51.86
NewYork 338 1.85 53.71 1.85 53.71
Northeast 338 1.85 55.56 1.85 55.56
NorthernNewEngland 338 1.85 57.42 1.85 57.42
Orlando 338 1.85 59.27 1.85 59.27
Philadelphia 338 1.85 61.12 1.85 61.12
PhoenixTucson 338 1.85 62.97 1.85 62.97
Pittsburgh 338 1.85 64.83 1.85 64.83
Plains 338 1.85 66.68 1.85 66.68
Portland 338 1.85 68.53 1.85 68.53
RaleighGreensboro 338 1.85 70.38 1.85 70.38
RichmondNorfolk 338 1.85 72.23 1.85 72.23
Roanoke 338 1.85 74.09 1.85 74.09
Sacramento 338 1.85 75.94 1.85 75.94
SanDiego 338 1.85 77.79 1.85 77.79
SanFrancisco 338 1.85 79.64 1.85 79.64
Seattle 338 1.85 81.49 1.85 81.49
SouthCarolina 338 1.85 83.35 1.85 83.35
SouthCentral 338 1.85 85.20 1.85 85.20
Southeast 338 1.85 87.05 1.85 87.05
Spokane 338 1.85 88.90 1.85 88.90
StLouis 338 1.85 90.76 1.85 90.76
Syracuse 338 1.85 92.61 1.85 92.61
Tampa 338 1.85 94.46 1.85 94.46
TotalUS 338 1.85 96.31 1.85 96.31
West 338 1.85 98.16 1.85 98.16
WestTexNewMexico 335 1.84 100.00 1.84 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 11
library(summarytools)
freq(Caso_Aguacate_xls$`type (TIPO)`)
Frequencies
Caso_Aguacate_xls$`type (TIPO)`
Type: Character
Freq % Valid % Valid Cum. % Total % Total Cum.
------------------ ------- --------- -------------- --------- --------------
conventional 9126 50.01 50.01 50.01 50.01
organic 9123 49.99 100.00 49.99 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00
🥑TABLA 12
library(summarytools)
freq(Caso_Aguacate_xls$`year (AÑO)`)
Frequencies
Caso_Aguacate_xls$`year (AÑO)`
Type: Numeric
Freq % Valid % Valid Cum. % Total % Total Cum.
----------- ------- --------- -------------- --------- --------------
2015 5615 30.77 30.77 30.77 30.77
2016 5616 30.77 61.54 30.77 61.54
2017 5722 31.36 92.90 31.36 92.90
2018 1296 7.10 100.00 7.10 100.00
<NA> 0 0.00 100.00
Total 18249 100.00 100.00 100.00 100.00